//
//  TankLayer.h
//  lust
//
//  Created by fan on 13-4-1.
//
//

#import "CCLayer.h"
#import "cocos2d.h"
#import "TankSprite.h"
@interface TankLayer : CCLayer
{
    CCSprite* spriteExplode;
    CCSprite* spriteExplodeBig;
    
    CCSpriteBatchNode* sheetExplode;
    CCSpriteBatchNode* sheetExplodeBig;
    
    TankSprite* tank;
    CCTMXTiledMap* gameWorld;
    
    float viewOrgX,viewOrgY,viewOrgZ;
    float screenWidth,screenHeight,tileSize;
    float mapX,mapY;
    NSMutableArray* enemyList;
    CCLabelBMFont* lbEnemy;
}
@property(nonatomic,readwrite,assign)float mapX;
@property(nonatomic,readwrite,assign)float mapY;
@property(nonatomic,readwrite,assign)float screenWidth;
@property(nonatomic,readwrite,assign)float screenHeight;
@property(nonatomic,readwrite,assign)float tileSize;
@property(nonatomic,readwrite,assign)CCTMXTiledMap* gameWorld;
@property(nonatomic,readwrite,assign)NSMutableArray* enemyList;
@property(nonatomic,readwrite,assign)TankSprite* tank;

-(void)ShowExplodeAt:(CGPoint)posAt;
-(void)ShowBigExplodeAt:(CGPoint)posAt;

-(void)OnTankAction:(TankAction)kt;
-(unsigned int)TileIdFromPosition:(CGPoint)pos;
-(CGPoint)tileCoodinateFromPos:(CGPoint)pos;
-(void)DestroyTile:(CGPoint)pos;
-(float)gameWorldWidth;
-(float)gameWorldHeight;
+(CCScene*)scene;
@end
